package com.geekca.d4;

public class ArrayDynamic {
    public static void main(String[] args) {
        /**
         * 动态初始化
         * 指定数组长度,暂时不放入元素
         * 默认值
         */
        int[] ages= new int[3];
        for (int i = 0; i < ages.length; i++) {
            System.out.println(ages[i]);
        }

        double[] moneys = new double[4];
        for (int i = 0; i < moneys.length; i++) {
            System.out.println(moneys[i]);
        }

        boolean[] okArr = new boolean[3];
        for (int i = 0; i < okArr.length; i++) {
            System.out.println(okArr[i]);
        }

        String[] names = new String[3];
        System.out.println(names[0]);
        names[0]="goulun";
        System.out.println(names[0]);

    }
}
